package com.zzty.txj1.service.impl;

import com.zzty.txj1.dao.SelfExanMapper;
import com.zzty.txj1.dao.TeanExamMapper;
import com.zzty.txj1.entity.*;
import com.zzty.txj1.entity.SelfExamTransaction;
import com.zzty.txj1.service.LookSelfExamService;
import com.zzty.txj1.service.LookSelfExamService;
import com.zzty.txj1.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LookSelfExamServiceImpl implements LookSelfExamService {
    @Autowired
    SelfExanMapper selfExanMapper;
    @Override
    public Integer getId(SelfExam selfExam){
        System.out.println("team"+selfExam.toString());
        Integer id=selfExanMapper.getId(selfExam);
        return id;
    }
    @Override
    public List<Integer> getUserIds(Integer id){
        List<Integer>getUserIds=selfExanMapper.getUserIds(id);
        return getUserIds;
    }
    @Override
    public User getUserName(Integer id){
        System.out.println("id"+id);
        User user=selfExanMapper.getUserName(id);
        System.out.println("userservice"+user.toString());
        return user;
    }
    @Override
    public SelfExamTransaction getinfo(SelfExamTransaction selfExamTransaction){
        SelfExamTransaction selfExamTransaction1=selfExanMapper.getinfo(selfExamTransaction);
        return selfExamTransaction1;
    }

    @Override
    public Integer updateSelfExamTransaction(SelfExamTransaction selfExamTransaction){
        Integer count=selfExanMapper.updateSelfExamTransaction(selfExamTransaction);
        return count;
    }
    @Override
    public Integer getUserId(String name){
        Integer id=selfExanMapper.getUserId(name);
        return id;
    }
    @Override
    public Integer updateSelfExam(SelfExam selfExam){
        Integer count=selfExanMapper.updateSelfExam(selfExam);
        return count;
    }
}
